package com.mairuide.phone.phonetitle;

/**
 * @Auther: zyj
 * @Date: 2019/2/25 15:11
 * @Description:
 */
public enum PhoneTitleHead {

    TITLE_NAMBER_BUSINESS_TYPE_001("1","businessType"),//业务类型
    TITLE_NAMBER_STARTING_TIME_002("2","startingTime"),//起始时间
    TITLE_NAMBER_SERVICE_NUMBER_003("3","serviceNumber"),//服务号码
    TITLE_NAMBER_SERVICE_USER_INFORMATION_004("4","serviceUserInformation"),//服务号码用户信息
    TITLE_NAMBER_SERVICE_LOCATION_005("5","serviceLocation"),//服务号码归属地
    TITLE_NAMBER_CARD_NUMBER_006("6","cardNumber"),//卡号
    TITLE_NAMBER_DEVICE_NUMBER_007("7","deviceNumber"),//设备号码
    TITLE_NAMBER_PARTY_NUMBER_008("8","partyNumber"),//对方号码
    TITLE_NAMBER_PARTY_USER_INFORMATION_009("9","partyUserInformation"),//对方号码用户信息
    TITLE_NAMBER_PARTY_LOCATION_010("10","partyLocation"),//对方号码归属地
    TITLE_NAMBER_TALK_TIME_011("11","talkTime"),//通话时长
    TITLE_NAMBER_CALL_TYPE_012("12","callType"),//呼叫类型
    TITLE_NAMBER_LAC_013("13","lac"),//LAC
    TITLE_NAMBER_CID_014("14","cid"),//CID
    TITLE_NAMBER_BASE_STATION_015("15","baseStation"),//服务号码基站
    TITLE_NAMBER_MSC_016("16","msc"),//MSC
    TITLE_NAMBER_CITY_017("17","city"),//城市
    TITLE_NAMBER_THIRD_NUMBER_018("18","thirdNumber"),//第三方号码
    TITLE_NAMBER_THIRD_NUMBER_INFORMATION_019("19","thirdNumberInformation"),//第三方号码用户信息
    TITLE_NAMBER_THIRD_NUMBER_LOCATION_020("20","thirdNumberLocation"),//第三方号码归属地
    TITLE_NAMBER_OPERATOR_CODE_021("21","operationCode"),//漫游城市或运营商代码
    TITLE_NAMBER_OPERATOR_CODE_INFORMATION_022("22","operationCodeInformation"),//漫游城市或运营商代码信息
    TITLE_NAMBER_BUSINESS_KEY_023("23","businessKey"),//业务键
    TITLE_NAMBER_BUSINESS_KEY_024("24","idNumber"),//身份证号
    TITLE_NAMBER_LNGB_025("25","lngb"),//百度经度
    TITLE_NAMBER_LATB_026("26","latb"),//百度纬度
    TITLE_NAMBER_ADDRESS_027("27","address"),//地址

   ;



    private String oldHead;
    private String newHead;

    private PhoneTitleHead(String oldHead, String newHead){
        this.oldHead = oldHead;
        this.newHead = newHead;
    }

    public String getOldHead() {
        return oldHead;
    }

    public void setOldHead(String oldHead) {
        this.oldHead = oldHead;
    }

    public String getNewHead() {
        return newHead;
    }

    public void setNewHead(String newHead) {
        this.newHead = newHead;
    }

    public static String getNewHeadByOldHead(String oldHead){
        PhoneTitleHead[] values = PhoneTitleHead.values();
        for (PhoneTitleHead pgh:values){
            String head = pgh.getOldHead();
            if (head.equals(oldHead)){
                return pgh.getNewHead();
            }
        }
        return null;
    }
}
